package com.iqiyi.pps.epg.core.service.broadcast;

import com.iqiyi.pps.epg.core.model.channel.ChannelBase;
import com.iqiyi.pps.epg.core.model.channel.ChannelConfig;
import com.iqiyi.pps.epg.core.model.control.LocationControl;
import com.iqiyi.pps.epg.core.model.control.PlatformControl;
import com.iqiyi.pps.epg.core.model.control.ProgramPlatformControl;
import com.iqiyi.pps.epg.core.model.control.ProgramPlatformControlInfo;
import com.iqiyi.pps.epg.core.model.program.ProgramData;

import java.util.List;
import java.util.Map;

public interface BroadcastControlService {
    PlatformControl getPlatformByUnique(long fatherId, int platform);

    LocationControl getLocationByUnique(long fatherId, int location);

    boolean savePlatform(PlatformControl entity);

    boolean saveLocation(LocationControl entity);

    List<PlatformControl> getPlatformControls(long channelId);

    List<LocationControl> getLocationControls(long channelId);

    boolean isSetBroadcastControl(long channelId);

    boolean sets(long channelId, List<PlatformControl> platformControls);

    boolean writeQipuBroadcast(ChannelBase channelInfo);

    boolean writeQipuBroadcastIgnoreReservation(ChannelBase channelInfo, List<PlatformControl> platformControls, List<ChannelConfig> platformConfigs);

    Map<Long, Integer> fetchPlatControls(int liveType);

    /*节目级播控相关*/
    List<ProgramPlatformControl> getProgramPlatformControls(long programId);

    boolean writeQipuBroadcast(ProgramData programData);

    void fillProgramBroadcast( ProgramData programData );

    boolean writeEpisodeNewQipu(long episodeQipuId,boolean searchForbidden , List<ProgramPlatformControl> platformControls);

    boolean setsWithProgram(long programId, Map<Integer, ProgramPlatformControl> platformControls);

    List<ProgramPlatformControlInfo> fetchProgramPlatControls();
}
